package com.songlanyun.modules.donationpointsconfig.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;

import com.songlanyun.common.drive.RootEntity;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 公益积分捐赠设置
 *
 * @author wuchao
 * @email songlanyun@gmail.com
 * @date 2022-08-02 17:22:40
 */
@Data
@TableName("yxt_donation_points_config")
public class DonationPointsConfigEntity extends RootEntity<Long, DonationPointsConfigEntity> implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;
    /**
     * 公益积分
     */
    @NotNull(message = "公益积分不能为空")
    @DecimalMin(value = "0.01", message = "公益积分不能少于0.01")
    private BigDecimal points;
    /**
     * 图片
     */
    @NotBlank(message = "图片不能为空")
    private String img;

    @TableLogic
    private Integer deleted;

    @Override
    public Long getIdentity() {
        return this.getId();
    }
}
